//
//  UserModel.m
//  1gene
//
//  Created by 1jiyin on 16/4/20.
//  Copyright © 2016年 1jiyin. All rights reserved.
//

#import "UserModel.h"
#import "NSDictionary+NULLToNSString.h"
@implementation UserModel

-(instancetype)initWithDictionary:(NSDictionary *)dic
{
    if (self = [super init]) {
        dic = [NSDictionary changeType:dic];
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.userId=value;
    }
    
    if ([key isEqualToString:@"name"]) {
        self.userName=value;
    }
    
    if ([key isEqualToString:@"phone"]) {
        self.userPhone=value;
    }
}
@end
